package org.bigdata.zc.config;

import lombok.Data;
import org.bigdata.zc.GlobalValFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created by Stephen on 2017/11/8.
 */
@Component
@Data
public class GlobalVal {

    @PostConstruct
    public void init(){
        GlobalValFactory.setValue1(startValue);
        GlobalValFactory.setValue2(endValue);
    }

    public GlobalVal(){

    }
    // startValue
    @Value("${teamwin.startValue}")
    double startValue;

    // endValue
    @Value("${teamwin.endValue}")
    double endValue;
}
